home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / dev / gcc / libnixV1_0.lha / gnu / libnix-sources.lha / examples / helloworld.c next >
C/C++ Source or Header  |  1995-01-22  |  514b  |  21 lines

  1. #include <dos/dos.h>
  2. #include <workbench/workbench.h>
  3. #include <inline/exec.h>
  4. #include <inline/dos.h>
  5.  
  6. int __nocommandline=1; /* Disable commandline parsing  */
  7. int __initlibraries=0; /* Disable auto-library-opening */
  8.  
  9. struct DosLibrary *DOSBase=NULL;
  10.  
  11. extern struct WBStartup *_WBenchMsg;
  12.  
  13. int main(void)
  14. { if(_WBenchMsg==NULL)
  15.   { if((DOSBase=(struct DosLibrary *)OpenLibrary("dos.library",33))!=NULL)
  16.     { Write(Output(),"Hello world\n",12);
  17.       CloseLibrary((struct Library *)DOSBase); } }
  18.   return 0;
  19. }
  20.  
  21.